
from pyspark import SparkContext

sc = SparkContext('local','test')

a = list(range(1,101))

aRDD = sc.parallelize(a)
res1=aRDD.reduce(lambda x,y:x+y)

print(res1)

sc.stop()